<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of Math
 *
 * @author adiez
 */
class Math {

    public static function calcPercent($param1, $param2, $decimal = 1) {
        if ($param1 != 0) {
            return round(($param2 * 100) / $param1, $decimal);
        }else{
            return 0;
        }
    }

}

?>
